In order to detect a detection target such as a recording medium, an original, and a component of the image forming device, an abutment portion and a detecting element are conventionally provided. The abutment portion is pivotally movable about an axis of a shaft upon abutment of the detection target to the abutment portion. The detecting unit is adapted to detect a detected portion that is also pivotally moved together with the abutment portion. For example, when the recording medium is brought into abutment with the abutment portion, the detected portion is moved concurrent with the pivotal movement of the abutment portion. Thus, the detecting unit detects the detected portion to generate a detection signal. Accordingly, various control is achievable in response to the detection signal. In this type of image forming device, the shaft of the abutment portion is attached to a paper end sensor serving as the detecting unit as described in laid-open Japanese Patent Application Publication No. H08-225187.
However, in order to produce such assembly described in the JP publication, a custom-ordered paper end sensor must be used so that the paper end sensor is provided with a bearing portion. A positioning error of the detection element with respect to a base member which supports the shaft, or positioning error of the shaft with respect to the base member may affect detection accuracy in case pivotal motion of the abutment portion is detected by an ordinary detecting element fixed to a print circuit board. To overcome this drawback, a design change is required to enlarge a pivot angle of the abutment portion. Consequently, a range of design choice may be restricted.